.class public Lcom/philzhu/www/ddz/Player;
.super Ljava/lang/Object;
.source "Player.java"


# static fields
.field public static final PLAYER_D:I = 0x3

.field public static final PLAYER_M:I = 0x1

.field public static final PLAYER_U:I = 0x2


# instance fields
.field public canOutAllTheWay:Z

.field public cards:Ljava/util/Vector;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Vector",
            "<",
            "Lcom/philzhu/www/ddz/Card;",
            ">;"
        }
    .end annotation
.end field

.field public cardsInfo:Lcom/philzhu/www/ddz/PlayersCardsInfo;

.field public grade:I

.field public isCalling:Z

.field public isDizhu:Z

.field public isOutCarding:Z

.field private outCards:Ljava/util/Vector;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Vector",
            "<",
            "Lcom/philzhu/www/ddz/Card;",
            ">;"
        }
    .end annotation
.end field

.field public outCardsTimes:I

.field private playerType:I


# direct methods
.method public constructor <init>(ILjava/util/Vector;)V
    .locals 2
    .parameter "playerType"
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(I",
            "Ljava/util/Vector",
            "<",
            "Lcom/philzhu/www/ddz/Card;",
            ">;)V"
        }
    .end annotation

    .prologue
    .local p2, cards:Ljava/util/Vector;,"Ljava/util/Vector<Lcom/philzhu/www/ddz/Card;>;"
    const/4 v1, 0x0

    .line 23
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 11
    iput-boolean v1, p0, Lcom/philzhu/www/ddz/Player;->canOutAllTheWay:Z

    .line 13
    const/4 v0, 0x0

    iput-object v0, p0, Lcom/philzhu/www/ddz/Player;->cardsInfo:Lcom/philzhu/www/ddz/PlayersCardsInfo;

    .line 14
    iput-boolean v1, p0, Lcom/philzhu/www/ddz/Player;->isCalling:Z

    .line 15
    iput-boolean v1, p0, Lcom/philzhu/www/ddz/Player;->isOutCarding:Z

    .line 16
    iput-boolean v1, p0, Lcom/philzhu/www/ddz/Player;->isDizhu:Z

    .line 18
    iput v1, p0, Lcom/philzhu/www/ddz/Player;->outCardsTimes:I

    .line 21
    new-instance v0, Ljava/util/Vector;

    invoke-direct {v0}, Ljava/util/Vector;-><init>()V

    iput-object v0, p0, Lcom/philzhu/www/ddz/Player;->outCards:Ljava/util/Vector;

    .line 25
    iput-object p2, p0, Lcom/philzhu/www/ddz/Player;->cards:Ljava/util/Vector;

    .line 26
    iput p1, p0, Lcom/philzhu/www/ddz/Player;->playerType:I

    .line 27
    return-void
.end method


# virtual methods
.method public getOutCards()Ljava/util/Vector;
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Ljava/util/Vector",
            "<",
            "Lcom/philzhu/www/ddz/Card;",
            ">;"
        }
    .end annotation

    .prologue
    .line 36
    iget-object v0, p0, Lcom/philzhu/www/ddz/Player;->outCards:Ljava/util/Vector;

    return-object v0
.end method

.method public getPlayerType()I
    .locals 1

    .prologue
    .line 31
    iget v0, p0, Lcom/philzhu/www/ddz/Player;->playerType:I

    return v0
.end method

.method public getUnderCards(Ljava/util/Vector;)V
    .locals 1
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/Vector",
            "<",
            "Lcom/philzhu/www/ddz/Card;",
            ">;)V"
        }
    .end annotation

    .prologue
    .line 55
    .local p1, cards:Ljava/util/Vector;,"Ljava/util/Vector<Lcom/philzhu/www/ddz/Card;>;"
    iget-object v0, p0, Lcom/philzhu/www/ddz/Player;->cards:Ljava/util/Vector;

    invoke-static {v0, p1}, Lcom/philzhu/www/ddz/AI;->concatCards(Ljava/util/Vector;Ljava/util/Vector;)Ljava/util/Vector;

    .line 56
    iget-object v0, p0, Lcom/philzhu/www/ddz/Player;->cards:Ljava/util/Vector;

    invoke-static {v0}, Lcom/philzhu/www/ddz/AI;->sortByBigOrSmall(Ljava/util/Vector;)Ljava/util/Vector;

    move-result-object v0

    iput-object v0, p0, Lcom/philzhu/www/ddz/Player;->cards:Ljava/util/Vector;

    .line 57
    return-void
.end method

.method public makeCards()V
    .locals 1

    .prologue
    .line 68
    iget-object v0, p0, Lcom/philzhu/www/ddz/Player;->cards:Ljava/util/Vector;

    invoke-static {v0}, Lcom/philzhu/www/ddz/AI;->makeCards(Ljava/util/Vector;)Lcom/philzhu/www/ddz/PlayersCardsInfo;

    move-result-object v0

    iput-object v0, p0, Lcom/philzhu/www/ddz/Player;->cardsInfo:Lcom/philzhu/www/ddz/PlayersCardsInfo;

    .line 69
    return-void
.end method

.method public outCards(Ljava/util/Vector;)Z
    .locals 2
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/Vector",
            "<",
            "Lcom/philzhu/www/ddz/Card;",
            ">;)Z"
        }
    .end annotation

    .prologue
    .line 46
    .local p1, cards:Ljava/util/Vector;,"Ljava/util/Vector<Lcom/philzhu/www/ddz/Card;>;"
    invoke-static {p0, p1}, Lcom/philzhu/www/ddz/Keeper;->remove(Lcom/philzhu/www/ddz/Player;Ljava/util/Vector;)V

    .line 47
    invoke-static {p1}, Lcom/philzhu/www/ddz/AI;->sortByFaceAndSuit(Ljava/util/Vector;)Ljava/util/Vector;

    move-result-object v1

    iput-object v1, p0, Lcom/philzhu/www/ddz/Player;->outCards:Ljava/util/Vector;

    .line 48
    iget-object v1, p0, Lcom/philzhu/www/ddz/Player;->cards:Ljava/util/Vector;

    invoke-static {v1, p1}, Lcom/philzhu/www/ddz/AI;->deleteCards(Ljava/util/Vector;Ljava/util/Vector;)Z

    move-result v0

    .line 49
    .local v0, canDelete:Z
    invoke-virtual {p0}, Lcom/philzhu/www/ddz/Player;->makeCards()V

    .line 50
    return v0
.end method

.method public setDizhu(Ljava/util/Vector;)V
    .locals 1
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/Vector",
            "<",
            "Lcom/philzhu/www/ddz/Card;",
            ">;)V"
        }
    .end annotation

    .prologue
    .line 61
    .local p1, underCards:Ljava/util/Vector;,"Ljava/util/Vector<Lcom/philzhu/www/ddz/Card;>;"
    invoke-virtual {p0, p1}, Lcom/philzhu/www/ddz/Player;->getUnderCards(Ljava/util/Vector;)V

    .line 62
    invoke-virtual {p0}, Lcom/philzhu/www/ddz/Player;->makeCards()V

    .line 63
    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/philzhu/www/ddz/Player;->isDizhu:Z

    .line 64
    return-void
.end method

.method public setOutCards(Ljava/util/Vector;)V
    .locals 0
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/Vector",
            "<",
            "Lcom/philzhu/www/ddz/Card;",
            ">;)V"
        }
    .end annotation

    .prologue
    .line 41
    .local p1, outCards:Ljava/util/Vector;,"Ljava/util/Vector<Lcom/philzhu/www/ddz/Card;>;"
    iput-object p1, p0, Lcom/philzhu/www/ddz/Player;->outCards:Ljava/util/Vector;

    .line 42
    return-void
.end method
